﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using RentIt06FormsClient.CreateAccountSession;
using RentIt06FormsClient.LoginSession;

namespace RentIt06FormsClient
{
    public partial class Frontpage : Form
    {
        private LoginSessionClient client;

        public Frontpage() {
            //client = new LoginSessionClient();
            InitializeComponent();
            // TODO: Ask for user credentials.
            //client.Login("", "");
            PopulateHotList(new List<Media>(new Media[] {
                new Media() { Title="John john tager i skoven" },
                new Media() { Title="Så er der DERP på programmet!" },
                new Media() { Title="W00t, W00t" }
            }));
        }

        private void PopulateHotList(List<Media> medias) {
            hotlist.SuspendLayout();
            foreach (var m in medias)
                hotlist.Controls.Add(new MediaItem(m.Title));
            hotlist.ResumeLayout();
        }
    }
}
